package com.proyecto.estavoley;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class MenuPrincipal extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menuprincipal);

		final ImageView btnPlantilla = (ImageView) findViewById(R.id.botonPlantilla);
		final ImageView btnEstadistica = (ImageView) findViewById(R.id.botonEstadistica);
		final ImageView btnRival = (ImageView) findViewById(R.id.botonRival);
		final ImageView btnInformes = (ImageView) findViewById(R.id.botonInformes);

		btnPlantilla.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				// Creamos el Intent
				Intent intentPlantilla = new Intent(MenuPrincipal.this,
						Plantilla.class);

				// Iniciamos la actividad
				startActivity(intentPlantilla);

			}
		});

		btnEstadistica.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				// Creamos Intent
				Intent intentEstadistica = new Intent(MenuPrincipal.this,
						Estadistica.class);

				// Inicia Activity
				startActivity(intentEstadistica);

			}
		});

		btnRival.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent intentRival = new Intent(MenuPrincipal.this, Rival.class);
				startActivity(intentRival);

			}
		});

		btnInformes.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent intentInforme = new Intent(MenuPrincipal.this,
						Informe.class);
				startActivity(intentInforme);
			}
		});
	}

}
